from llama_index.core.llms import ChatMessage
from llama_index.llms.openai import OpenAI
import config

messages = [
    ChatMessage(
        role="system", content="You are a pirate with a colorful personality."
    ),
    ChatMessage(role="user", content="What is your name?"),
]
resp = OpenAI().chat(messages)
print(resp)